Loading computer programs in blocks

ABSTRACT

A method for loading computer programs into a portable object memory, in particular a chip card, from one or several transmitting devices EM 1 , . . . EMj, . . . EMp, p being a whole number. The computer program is divided into n blocks BLK 1 , . . . BLKi, . . . BLKn, n being a whole number greater than  1 . Information I(n) representing a number of blocks to be loaded is transmitted to the portable object. The blocks BLK 1 , . . . BLKi, . . . BLKn are loaded into the portable object memory, and each block BLKi loaded in the portable object is counted, restarting from the last block during re-loading, to avoid restarting from the beginning.

FIELD OF THE INVENTION

The invention concerns the loading of computer programs into a memory ofa portable object, and particularly into a memory of a chip card.

Chip cards are portable objects constituted by a card body and a chip.

BACKGROUND OF THE INVENTION

The chip comprises an integrated circuit on the surface of a siliconsubstrate, said circuit specifically defining storage areas of the chipand a microcontroller part that handles, in particular, the managementof the data among the various storage areas.

This chip, whether or not it is carried in an electronic module, isintegrated into the card body and communicates with the outside world bymeans of electrical contacts or an antenna. Depending on its mode ofcommunication, the card is said to be contact or non-contact, it beingunderstood that there are so-called combined cards capable ofcommunicating in both communication modes, with or without contact.

Conventionally, chip cards are used in applications in which theyidentify their holder and allow said holder, for example, to obtain aright, such as a right to access services or perform transactions.

Access to services sometimes requires a computer program to be loadedinto a memory of the card.

However, these computer programs are increasing in size, currentlyreaching 8 KB and expected to reach 64 KB in the near future.

The throughput rate of the microcontroller of the card and the writetime of the memories do not allow the instantaneous loading of largeprograms.

For example, the loading time of an 8-KB program into a non-contact cardfrom a transmitting device is on the order of one minute, which is muchtoo long to allow the loading of a program in the average time duringwhich the card is in the effective electromagnetic field of saidtransmitting device, particularly given the fact that this device musthandle a plurality of cards, as well as potential collisions betweensaid cards.

In practice, the loading is then interrupted, and it is necessary towait for the time spent in the field of another transmitting device tobe long enough for the successful loading of the program in itsentirety.

OBJECTS AND SUMMARY OF THE INVENTION

Thus, given the above, one problem that the invention proposes to solveis to allow the loading of a program without the loading timeconstraints that currently affect the successful loading of saidprogram.

With respect to this problem, the subject of the proposed solution ofthe invention is a method for loading computer programs into a memory ofa portable memory object having a contactless operating mode,particularly a chip card, from one or more transmitting devices EM1, . .. , EMj, . . . , EMp, p being a whole number greater than or equal to 1,characterized in that it comprises the following steps in which:

-   -   the computer program is divided into n blocks BLK1, . . . BLKi,        . . . , BLKn, n being a whole number greater than 1;    -   a piece of information I(n) indicating the number n of blocks to        be loaded is transmitted to the portable object;    -   the blocks BLK1, . . . , BLKi, . . . , BLKn are loaded without        contact into a memory of the portable object;    -   the loading of the blocks BLK1, . . . , BLKi, . . . , BLKn is        interrupted during the loading of a block;    -   the loading of the blocks is resumed; and    -   each block BLKi loaded is counted in the portable object.

Advantageously, the method of the invention also comprises the followingsteps, in which: the loading of the blocks is interrupted during theloading of a block BLKi; the loading of the blocks is resumed with theblock BLKi; means FLG in the portable object indicate to a transmittingdevice EMj the loading state FLG=Y or nonloading state FLG=N, of theportable object; and prior to the resumption of the loading of the blockBLKi, the loading or nonloading state of the portable object isverified.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

The invention will be better understood through the reading of thenon-limiting description below.

The method of the invention applies to portable memory objects, andpreferably to chip cards whose format and properties are defined in thestandards ISO 78-10 and 78-16, whose contents are incorporated into thepresent specification by reference, or more preferably, applies to suchcards having a contactless operating mode, possibly in addition to aconventional contact operating mode, said cards being characterized inthe standard ISO 14443.

Non-contact chip cards have an integrated circuit in a siliconsubstrate, the circuit and substrate assembly constituting the chip,said chip being integrated into an electronic module that is itselfintegrated into a card body, or integrated directly into said card body.

The integrated circuit defines various memories of the chip, includingat least one volatile memory RAM and at least one nonvolatile memoryROM, this nonvolatile memory or any of the nonvolatile memories being,as necessary, an electrically erasable programmable memory EEPROM, or amemory of the Flash type PROM. Furthermore, this integrated circuitdefines a central processor CPU or microcontroller, said centralprocessor handling, in particular, the management of the data among thevarious memories, via an address bus and a data bus, said managementbeing timed by clock cycles.

The invention is for loading a computer program PRG into one of thememories of the card, and particularly into a nonvolatile EEPROM typememory of said card.

Such a program PRG is a set of computer data, defining for example a setof instructions executable by the card. This is the case for applicationprograms written in high-level languages of the Java type, known asapplets. In one example, these are programs that allow access toservices, as in the case of an ATM card, or a program that allows thecard to perform electronic purse applications. The size of the programsPRG can vary. However, the invention is particularly advantageous in thecase of programs of large size, on the order of or greater than 2 KB,for example 8 KB or even 64 KB, whose total practical loading time isgreater than 5 seconds.

In the exemplary embodiment described in the present description, theprogram PRG is loaded into the memory EEPROM of the card, from one ormore transmitting readers EM1, . . . , EMj, . . . , EMp, p being anatural whole number greater than or equal to 1, each transmittingdevice EMj having a copy of the program or being capable of obtainingsuch a copy from an associated server, under the control of an operator.

For its loading, the program PRG is divided, according to the invention,into n blocks BLK1, . . . , BLKi, . . . , BLKn, n being a natural wholenumber strictly greater than 1, all of the blocks BLKi advantageouslyhaving a similar size, preferably on the order of the memory space RAMreserved as a write buffer and called a buffer memory.

For example, a 2-KB computer program can be divided into eight blocksBLK1, . . . , BLK8 of about 256 bytes each.

The card may or may not be in a loading state, i.e., a state in which itis waiting for the program PRG to be loaded.

When the card is in the loading state, a storage area FLG of the card,located in the memory EEPROM, is written with a datum, for examplebinary, indicating said loading state FLG=Y. Otherwise, FLG=N.

When the card enters the effective electromagnetic communication fieldof a transmitting device EM1, a contactless dialog is establishedbetween said card and said transmitting device EM1, during which dialogthe loading state of the card is verified, or changed if a loadingdecision is made while the card is initially in the non-loading stateFLG=N.

If FLG=Y and if the loading of the program PRG has not started, a pieceof information (In) indicating the number n of blocks BLKi that the cardshould receive is transmitted by the transmitter EM1 to said card.

This indication I(n) is received by the card, particularly with theblock BLK1, the set of I(n) and BLK 1 first being stored in the buffermemory of the card, then retrieved by the central processor, whichstores the indication I(n), or an indication I′(n) derived from thisindication I(n), in a storage area COUNT serving as a counter. Likewise,the block BLK1 is stored in the nonvolatile memory EEPROM at a givenaddress, for example ADD1. When this block BLK1 is stored at thisaddress ADD1, the counting memory COUNT is decremented to COUNT=n−1,indicating that there are n−1 blocks remaining to be loaded.

If the dialog between the transmitting device EM1 and the card is notinterrupted, the block BLK2 is received, stored in buffer memory, thenin EEPROM at the address ADD2, specifically following ADD1, and thecounter COUNT is then decremented again to COUNT=n−2. The same thing isdone for each of the blocks BLKi up to BLKn.

However, if the dialog between the transmitting device EM1 and the cardis interrupted, for example in the case where the card leaves theeffective electromagnetic field of the transmitter EM1, the loading of ablock BLKi is interrupted, while the card is still in the loading stateFLG=Y.

It is then necessary for the card to enter the field of a newtransmitter EMj, which also has a copy of the program PRG divided intoblocks BLK1, . . . , BLKi, . . . BLKn, in order for the loading toresume, or for the card to re-enter the field of the transmitter EM1.This new transmitter EMj can be the transmitter EM1.

EMj then interrogates the card, asking it if it is in a loading state.The card responds that this is in fact the case, based on the indicationFLG=Y.

EMj then interrogates the card on the number of blocks loaded. The cardresponds that i−1 blocks have been loaded, based on the fact thatCOUNT=i−1.

The loading then resumes, with this new transmitter EMj, with the blockBLKi and continues up to the block BLKn, unless a new interruption makesit necessary for the card to enter the field of a new transmitter EMj.

When the block BLKn is loaded, the counter is at zero COUNT=0, and thecard is then placed in the non-loading state FLG=N.

Thus, no matter what the length of the program PRG to be loaded, aloading in blocks BLKi coupled with a counting of the blocks loadedmakes it possible, particularly in the case of non-contact cards, toload an entire program without the interruptions of the dialog betweenthe card and the transmitting devices requiring a new loading of theprogram from the start.

1. Method for loading computer programs into a memory of a portablememory object having a contactless operating mode, particularly a chipcard, from one or more transmitting devices EM1, . . . , EMj, . . . EMp,p being a whole number, the method comprising: the computer program isdivided into n blocks BLK1, . . . BLKi, . . . , BLKn, n being a wholenumber greater than 1; a piece of information I(n) indicating the numbern of blocks to be loaded is transmitted to the portable memory object;the blocks BLK1, . . . , BLKi, . . . BLKn are loaded without contactinto a memory of the portable memory object from a transmitting deviceEMj wherein j is in a range from 1 through p; each block BLKi is countedin the portable memory object; the loading of the blocks BLK1, . . . ,BLKi, . . . , BLKn is interrupted during the loading of a block BLKi dueto an interruption in communication between EMj and the card; inresponse to establishing of communication between one of thetransmitting device EMk and the card, wherein k is in a range 1 throughp: interrogating the card as to which block to resume loading, andresuming the loading of the blocks from block i from transmitting deviceEMk; and each block BLKi loaded is counted in the portable memoryobject.
 2. Method according to claim 1, the method further comprises:prior to the resumption of the loading of the block BLKi, the loading ornonloading state of the portable memory object is verified.
 3. Themethod according to claim 1, wherein EMj and EMk are two distincttransmitting devices.
 4. The method according to claim 1, furthercomprising: setting a flag FLG to indicate whether the card is in aloading state or in a non-loading state; and upon establishingcommunication between one of the transmitting devices EMk and the card,interrogating the flag FLG to determine whether the card is in a loadingstate.